package com.zsc.wxm.ysh.anjo.service.base.enums.resources;

import lombok.Getter;

/**
 * 描述：合约状态
 *
 * @author playmaker
 * @since 2021/3/10 20:30
 */
@Getter
public enum PromiseStatus {
    /**
     * 合约状态
     */
    SIGN_UP(1, "签约中"),
    FULFILLING(2, "履约中"),
    FINNISH(3, "已结束")
    ;
    /**
     * 值
     */
    private int value;

    /**
     * 描述
     */
    private String desc;

    PromiseStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getEnumDesc(int value) {
        for (PromiseStatus type : PromiseStatus.values()) {
            if (type.getValue() == value) {
                return type.getDesc();
            }
        }
        return "";
    }
}
